package com.wyd.response;

public enum ResultCode implements CustomizeResultCode{
//    20000成功
    SUCCESS(20000,"成功"),
    ERROR(20001,"失败"),

    /*运行时异常*/
    ARITHMETIC_EXCEPTION(9001,"算数异常"),

    USER_NOT_FOUND_EXCEPTION(3306,"用户不存在"),

    STUDENT_NOT_FOUND_EXCEPTION(3307,"学生不存在"),

    INSTITUTE_NOT_FOUND_EXCEPTION(3308,"未查询到学院信息"),

    SPECIALTY_NOT_FOUND_EXCEPTION(3309,"未查询到专业信息"),

    CLAZZ_NOT_FOUND_EXCEPTION(3310,"未查询到班级信息"),

    GRADE_NOT_FOUND_EXCEPTION(3311,"未查询到年级信息"),

    STUDENT_ALREADY_EXIST(3312,"学生已存在"),

    INSTITUTE_ALREADY_EXIST(3319,"学院已存在"),

    GRADE_NOT_EXIST(3313,"年级不存在"),

    INSTITUTE_NOT_EXIST(3314,"学院不存在"),

    SPECIALTY_NOT_EXIST(3315,"专业不存在"),

    CLAZZ_NOT_EXIST(3316,"班级不存在"),

    STUDENTS_CAN_NOT_DELETE(3317,"要删除的学生不存在"),

    INSTITUTE_CAN_NOT_DELETE(3320,"要删除的学院不存在"),

    STUDENTS_CAN_NOT_UPDATE(3318,"要编辑的学生不存在"),

    ;

    private Integer code;

    private String message;

    ResultCode(Integer code,String message){
        this.code=code;
        this.message=message;
    }



    @Override
    public Integer getCode() {
        return code;
    }

    @Override
    public String getMessage() {
        return message;
    }
}
